<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Auto Parts</title>
<link rel="stylesheet" type="text/css" href="../../css/mokstyle.css" />
<style>
		a:link {text-decoration: none;}
		a:visited {text-decoration: none;}
		a:active {text-decoration: none;}
		a:hover {text-decoration:underline;padding-bottom:8px;border-bottom:1 solid black}
		</style> 
		<script type="text/javascript">
			function changeTo(id){
				if(id==''){
					window.location="maintain_detail.jsp";
					return;
				}
				window.location="/aasimp/mok/maintenance/mt_changeTo?id="+id;
			}
			function showTo(id){
				window.location="/aasimp/mok/maintenance/mt_showTo?id="+id;
			}
			function init() {
		       if("${maintains}"!=""){
		       		document.getElementById("history").style.display = 'block';
					document.getElementById('a1').style.textDecoration = 'underline';
		       }
		       if("${message}"!=""){
		       		alert("${message}");
		       }
		       if("${info}"=="1"){
					document.getElementById('a1').style.textDecoration = 'none';
		       		document.getElementById("a2").style.display = 'none';
		       		document.getElementById("a3").style.display = 'none';
		       		document.getElementById("a4").style.display = 'none';
		       }
    		}
    		function deleteMt(id){
    			var a = window.confirm("确认删除该条记录？");
    			if(!a)return;
    			window.location="/aasimp/mok/maintenance/mt_deleteMt?id="+id;
    		}
		</script>

</head>
<body onload="init();">

<div  id="wrap">
 	<div class="header">
       		<div class="logo"><a href="/aasimp/mok/maintenance/index_getMtInfo"><img src="../../images/logo.gif" alt="" title="" border="0" /></a></div>            
        <div id="menu">
            <ul>                                                                       
            <li><a href="/aasimp/mok/maintenance/index_getMtInfo">首页</a></li>
            <li><a href="/aasimp/mok/maintenance/info_getcompany">个人资料</a></li>
            <li><a href="/aasimp/mok/maintenance/odd_getOdd" >维修申请</a></li>
            <li><a href="/aasimp/mok/maintenance/approve_showApprove">审批维修</a></li>
            <li class="selected"><a href="/aasimp/mok/maintenance/mt_showmts">维修记录</a></li>
            <li><a href="sendInfo.jsp">信息发布</a></li>
            <li><a href="/aasimp/mok/maintenance/report_showMtReport">报表统计</a></li>
            </ul>
        </div>  
       </div> 
       
       
       <div class="center_content" style="background-color:#FFFFFF;">
       	<div class="left_content" style="width: 880px">
       		<div class="crumb_nav">
            <a href="/aasimp/mok/maintenance/index_getMtInfo">home</a> &gt;&gt; 维修记录
            </div>
            <div class="title"><span class="title_icon"><img src="../../images/bullet1.gif" alt="" title="" /></span>
            <a id="a1" href="javascript:void(0)" onclick="window.location='/aasimp/mok/maintenance/mt_showmts'" style="text-decoration: none">维修记录</a>
            <a id="a2" href="javascript:void(0)"  onclick="changeTo('')" style="text-decoration:none">填写维修记录</a>
            </div>
        <center>
        	<div class="feat_prod_box_details" id="history" style="display: none;height: 230px;">
            <p class="details">
            </p>
                 <form name="register" action="#">          
                    <table width="100%"  border="1" align="center" cellspacing="1">
                    	<tr>
                    		<th>维修单号</th>
                    		<th>预约单号</th>
                    		<th>维修日期</th>
                    		<th>维修公司</th>
                    		<th>车辆识别号</th>
                    		<th>维修总金额</th>
                    		<th>维修结果</th>
                    		<th>操作</th>
                    	</tr>
                    	<c:forEach var="maintain" items="${maintains}">
						  <tr>
						    <td align="center">${maintain.maintainId}</td>
						    <td align="center">${maintain.oddId}</td>
						    <td align="center"><fmt:formatDate value="${maintain.maintainDate}" pattern="yyyy年MM月dd日"/></td> 
						    <td align="center">${maintain.company}</td>
						    <td align="center">${maintain.vin}</td>
						    <td align="center">${maintain.toprice}</td>
						    <td align="center">
						    <c:if test="${maintain.result=='1'}">成功</c:if>
						    <c:if test="${maintain.result=='0'}">报废</c:if>
						    <c:if test="${maintain.result=='2'}">再维修</c:if>
						    </td>
                    		<td><a href="javascript:void(0)" onclick="showTo('${maintain.maintainId}')">查看</a>
                    		<a id="a3" href="javascript:void(0)" onclick="changeTo('${maintain.maintainId}')">修改</a>
                    		<a id="a4" href="javascript:void(0)" onclick="deleteMt('${maintain.maintainId}')">删除</a></td>
						  </tr>
					 	 </c:forEach>
                    </table>
                  </form>
            </div>	
					</center>
            
            
        <div class="clear"></div>
        </div><!--end of left content-->
        
       
       <div class="clear"></div>
       </div><!--end of center content-->
       <div class="footer">
       	<div class="left_footer"><img src="../../images/footer_logo.gif" alt="" title="" /><br /> </div>
        <div class="right_footer">
       
        </div>
        
       
       </div>
       
       </div>
<iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="calendar/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; left:-500px; top:0px;"></iframe>
</body>
</html>